<?php
function smarty_modifier_ouser($intUserId,$strFieldname='username',$isFullname=0)
{
	$objEcoreUser = new Ecore_User();
	$objUserM		= $objEcoreUser->get($intUserId);
	if($strFieldname == 'fullname') {
		if($objUserM->fullname != '') {				
			if($objUserM->username != '' && $isFullname == 1) 
				return $objUserM->fullname . ' @' . $objUserM->username;				
			else
				return $objUserM->fullname ;
		}else {
			return $objUserM->username ;
		}
	} else {
		return $objUserM->$strFieldname;
	}
	
}
?>